<p-messages [(value)]="msg"></p-messages>
<div class="content-section implementation GridDemo" id="MalfunctionClose" >
  <div class="title col-sm-12">
    <div class="col-sm-1">
      <span>关闭故障单</span>
    </div>
    <div class="col-sm-11 pull-right">
      <button type="button"
              class="pull-right"
              pButton
              [routerLink]="['/index/maintenance/malfunctionBase']"
              icon="fa-close"
              style="width: 30px"></button>
    </div>
  </div>
  <form class="form-horizontal">
    <app-colse-base-view [sid]="sid"></app-colse-base-view>
    <div class="form-group">
      <label class="col-sm-1 control-label">
        <span ngClass="start_red">*</span>
        关闭代码：
      </label>
      <div class="col-sm-5 ui-fluid-no-padding ui-fluid">
        <p-dropdown [options]="malCloseOptions" [(ngModel)]="malClose"
                    placeholder="请选择关闭代码" optionLabel="name"
                    [ngModelOptions]="{standalone: true}"
                    [style]="{'width':'100%'}"></p-dropdown>
      </div>
      <label class="col-sm-1 control-label">关闭时间：</label>
      <div class="col-sm-5 ui-fluid-no-padding ui-fluid">
        <input type="text" pInputText  name="department" placeholder="请选择部门"
               [(ngModel)]="malCloseTime" readonly class="cursor_not_allowed"/>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-12 ui-no-padding-left-15px ui-no-padding-right-15px">
        <button  class="pull-right  ui-margin-right-10px"  pButton type="button" (click)="solved()" label="关闭并生成知识库" [disabled]="hadSaved"></button>
        <button class="pull-right ui-margin-right-10px ui-button-secondary" pButton type="button" (click)="close()" label="关闭" [disabled]="hadSaved"></button>
      </div>
    </div>
  </form>
  <p-dialog header="{{ dialogHeader }}" [(visible)]="departementDisplay" modal="modal" width="300" [responsive]="true">
    <p-tree [value]="filesTree4"
            selectionMode="{{ selectedMode }}"
            [(selection)]="selected"
            (onNodeExpand)="nodeExpand($event)"
            (onNodeSelect)="nodeSelect($event)"
    ></p-tree>
    <!--<div>Selected Nodes: <span *ngFor="let file of selected">{{file.label}} </span></div>-->
    <div style="margin-top:8px">Selected Node: {{selected ? selected.label : 'none'}}</div>
    <p-footer>
      <button type="button" pButton icon="fa-check" (click)="closeTreeDialog()" label="确定"></button>
      <button type="button" pButton icon="fa-close" (click)="departementDisplay=false" label="取消"></button>
    </p-footer>
  </p-dialog>
  <p-growl [(value)]="message"></p-growl>
</div>
